#version 300 es

precision mediump float;

#pragma include <common>
#pragma include "./fireflyxCommon.glsl"


layout (location = 0) in vec4 a_Position; //顶点 位置 是有默认值的 (0,0,0,1)
layout (location = 3) in vec2 a_UV;       //UV 纹理坐标

// uniform mat4 u_mMtx;       //模型矩阵
// uniform mat4 u_viewMtx;    //视窗矩阵
// uniform mat4 u_projectMtx; //投影矩阵

uniform ubo_model_block{
    mat4 u_mMtx;                            //模型矩阵
} uboModel;

uniform ubo_cam_block{
    mat4 u_viewMtx;                         //视窗矩阵
    mat4 u_projectMtx;                      //投影矩阵
    vec4 u_eyePos;                          //眼睛位置
} uboCam;

out vec2 v_uv;

void main() {
    v_uv = a_UV;
    
    mat4 mvpMat = uboCam.u_projectMtx * uboCam.u_viewMtx * uboModel.u_mMtx;

    gl_Position = mvpMat * a_Position;
}